package com.zhangjianling.sysuser.controller;

import com.zhangjianling.sysuser.entity.SysUser;
import com.zhangjianling.sysuser.sevice.SysUserService;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.HashMap;
import java.util.Map;

/**
 * @Auther: zhangjl
 * @Date: 18/11/1 10:38
 * @Description:
 */
@RestController
public class SysUserController {
    @Resource
    private SysUserService sysUserService;

    @PostMapping("saveUser")
    public Map<String, Object> saveUser(SysUser user) {
        Map<String, Object> res = new HashMap<>();
        try {
            res.put("code", 0);
            res.put("msg", "操作成功");

        } catch (Exception e) {
            e.printStackTrace();
            res.put("code", 1);
            res.put("msg", e.getMessage());
        }

        return res;
    }
}
